<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>首页</title>
</head>
<body>
    我是首页
    <!--isAuthenticated() 判断是否认证-->
    <div sec:authorize="isAuthenticated()">
        欢迎:<span sec:authentication="name"></span><br/>
        <span sec:authentication="principal.authorities"></span>
        <br>
        <a href="/logout">退出</a>
    </div>
    <hr/>
    <div sec:authorize="@pms.hasPermission('sys:user:list')"><a href="/sys/user/list">用户列表</a><br/></div>
    <div sec:authorize="@pms.hasPermission('sys:user:add')"><a href="/sys/user/add">用户添加</a><br/></div>
    <div sec:authorize="@pms.hasPermission('sys:user:delete')"><a href="/sys/user/delete">用户删除</a><br/></div>
    <div sec:authorize="@pms.hasPermission('sys:user:update')"><a href="/sys/user/update">用户编辑</a><br/></div>
</body>
<script th:inline="javascript">
</script>
</html>